package com.xiaozhichao.consumer002.controller;

import com.xiaozhichao.consumer002.config.Consumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    Consumer consumer;

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name){
        return consumer.hello(name);
    }


}
